// lang js,ts,vue java,xml sql
import { javascript } from '@codemirror/lang-javascript'
import { java } from '@codemirror/lang-java'
import { xml } from '@codemirror/lang-xml'
import { html } from '@codemirror/lang-html'
import { css } from '@codemirror/lang-css'
import { sql } from '@codemirror/lang-sql'
import { json } from '@codemirror/lang-json'
import { vue } from '@codemirror/lang-vue'

export const languageOptions = [
	{label:"Java",value:java},
	{label:"Javascript",value:javascript},
	{label:"Vue",value:vue},
	{label:"HTML",value:html},
	{label:"XML",value:xml},
	{label:"CSS",value:css},
	{label:"SQL",value:sql},
	{label:"JSON",value:json},
]

export function getLanguageSupport(label:string = 'Java'):Function{
	for(let i = 0 ;i<languageOptions.length ;i++){
		const temp = languageOptions[i]
		if(temp.label == label){
			return temp.value
		}
	}
	return java;
}
